package UI;

import Service.DataCenter;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.*;
import javafx.scene.canvas.*;
import javafx.scene.paint.*;
import javafx.scene.layout.*;
import javafx.stage.Stage;
import facecat.topin.core.*;
import javafx.scene.input.*; 

/**
 *
 * @author Administrator
 */
public class Facecat extends Application {
    @Override
    public void start(Stage primaryStage) {
        DataCenter.startService();
        DataCenter.startConnect();
        StackPane root = new StackPane();
        FCUIView m_view = new FCUIView();
        root.getChildren().add(m_view);
        Scene scene = new Scene(root, 1000, 800);
        m_view.widthProperty().bind(root.widthProperty());  
        m_view.heightProperty().bind(root.heightProperty());
        m_view.onLoad(scene);
        m_view.draw();
        primaryStage.setTitle("FaceCat-JavaFx");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }
    
}
